package com.woniuxy.cloud.carl.marketing.app.apiImpl;

import com.woniu.cloud.Aspect.log.Log;
import com.woniuxy.cloud.carl.marketing.client.AdvertisementClient;
import com.woniuxy.cloud.carl.marketing.client.param.AddAdParam;
import com.woniuxy.cloud.carl.marketing.client.param.DelAdParam;
import com.woniuxy.cloud.carl.marketing.client.param.GetAdParam;
import com.woniuxy.cloud.carl.marketing.client.result.AdvertisementDto;
import com.woniuxy.cloud.carl.marketing.service.AdvertisementService;
import com.woniuxy.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class AdvertisementAPIImpl implements AdvertisementClient {
    @Autowired
    AdvertisementService advertisementService;
    @Override
    @Log("添加活动广告")
    public Result addAd(AddAdParam param) {
        return advertisementService.addAd(param);
    }

    @Override
    @Log("删除活动广告")
    public Result delAd(DelAdParam param) {
        return advertisementService.delAd(param);
    }

    @Override
    @Log("查询活动广告信息")
    public Result<List<AdvertisementDto>> getAd(GetAdParam param) {
        return advertisementService.getAd(param);
    }


}
